<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>金灿教育培训中心</title>
	<link rel="shortcut icon" href="<%=request.getContextPath()%>/style_cp/img/icon.png" type="image/vnd.microsoft.icon"></link>
	<link rel="icon" href="<%=request.getContextPath()%>/style_cp/img/icon.png" type="image/vnd.microsoft.icon"></link>
	<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
	<script type="text/javascript">
	
		function set_course1(course_id){
			$("input[name='course_id']").val(course_id);
			var url = "${path}/ix/frame.htm";
			$("#form1").attr("action",url);
			$("#form1").submit();
		}
		
		function set_course2(course_id){
			$("input[name='course_id']").val(course_id);
			var url = "${path}/ix/frame.htm";
			$("#form2").attr("action",url);
			$("#form2").submit();
		}
		
		function set_course3(course_id){
			$("input[name='course_id']").val(course_id);
			var url = "${path}/ix/frame.htm";
			$("#form3").attr("action",url);
			$("#form3").submit();
		}
		
		
	</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<c:if test="${fn:length(courseList1)==0&&fn:length(courseList2)==0&&fn:length(courseList3)==0}">
		<div class="tip_div">对不起，您暂无管理课程，请联系管理员设定。</div>
	</c:if>
	<c:if test="${fn:length(courseList1)!=0}">
	<div>
		<form action="${path}/ix/frame_before.htm"  id="form2" method="post">
			<input type="hidden" name="course_id" />
			
			<h2>
				<div>请选择进行中课程</div>
			</h2>
			<table width="100%" class="listlindex">
				<tr>
					<th>课程</th>
					<th>开始日期</th>
					<th>结束日期</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${courseList1}" var="v">
				<tr>
					<td>
					<a href="javascript:set_course2('${v._id}')">${v.name}</a>
					</td>
					<td>${v.setup_date}</td>
					<td>${v.close_date}</td>
					<td>
						 <a href="javascript:set_course2('${v._id}')">【进入】</a>
					</td>
				</tr>
				</c:forEach>
			</table>
		</form>	
	</div>
	</c:if>
	<div>&nbsp</div>
	<c:if test="${fn:length(courseList2)!=0}">
	<div>
		<form action="${path}/ix/frame_before.htm" id="form3" method="post">
			<input type="hidden" name="course_id" />
			
			<h2>
				<div>请选择未开始课程</div>
			</h2>
				
			<table width="100%" class="listlindex">
				<tr>
					<th>课程</th>
					<th>开始日期</th>
					<th>结束日期</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${courseList2}" var="v">
				<tr>
					<td>
					<a href="javascript:set_course3('${v._id}')">${v.name}</a>
					</td>
					<td>${v.setup_date}</td>
					<td>${v.close_date}</td>
					<td>
						 <a href="javascript:set_course3('${v._id}')">【进入】</a>
					</td>
				</tr>
				</c:forEach>
			</table>
		</form>	
	</div>
	</c:if>
	<div>&nbsp</div>
	<c:if test="${fn:length(courseList3)!=0}">
	<div>
		<form action="${path}/ix/frame_before.htm" id="form1" method="post">
			<input type="hidden" name="course_id" />
			
			<h2>
				<div>请选择已结束课程</div>
			</h2>
				
			<table width="100%" class="listlindex">
				<tr>
					<th>课程</th>
					<th>开始日期</th>
					<th>结束日期</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${courseList3}" var="v">
				<tr>
					<td>
					<a href="javascript:set_course1('${v._id}')">${v.name}</a>
					</td>
					<td>${v.setup_date}</td>
					<td>${v.close_date}</td>
					<td>
						 <a href="javascript:set_course1('${v._id}')">【进入】</a>
					</td>
				</tr>
				</c:forEach>
			</table>
			<div class="options">
				<div class="quotes">
					<page:page page="${page}" />
				</div>
				<div class="clear"></div>
			</div>
		</form>	
	</div>
	</c:if>
</body>
</html>
